<%@ page language="java" contentType="text/html; charset=UTF-8"
	isELIgnored="false" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f"%>
<%@ taglib uri="/mytag" prefix="yjd"%>
<div class="wrap">
	<div class="nav">
		<div class="return">
			<a href='<yjd:url url="/db/biDatabaseInfo/list"/>'>返回上一级</a>
		</div>
	</div>
	<form method="post" action='<yjd:url url="/db/biDatabaseInfo/save"/>' class="J_ajaxForm" autocomplete="off">
		<input type="hidden" name="id" value="${model.id }">
		<div class="h_a">${empty model?"添加":"修改" }数据库</div>
		<div class="table_full">
			<table width="100%">
				<tr>
					<th width="200">标题</th>
					<td><input name="title" type="text" maxlength="100" class="input length_6"
						value="${model.title }"></td>
				</tr>
				<tr>
					<th>编码(唯一)</th>
					<td><input name="code" type="text" maxlength="100" class="input length_6"
						value="${model.code }"></td>
				</tr>
				<tr>
					<th>jdbc_driver</th>
					<td><input name="jdbc_driver" type="text" maxlength="200" class="input length_6"
						value="${model.jdbc_driver }"></td>
				</tr>
				<tr>
					<th>jdbc url</th>
					<td><input name="jdbc_url" type="text" maxlength="200" class="input length_6"
						value="${model.jdbc_url }"></td>
				</tr>
				<tr>
					<th>jdbc username</th>
					<td><input name="jdbc_username" type="text" maxlength="30" class="input length_6"
						value="${model.jdbc_username }"></td>
				</tr>
				<tr>
					<th>jdbc password</th>
					<td><input name="jdbc_password" type="text" maxlength="30" class="input length_6"
						value="${model.jdbc_password }"></td>
				</tr>
				<tr>
					<th>库业务类型</th>
					<td>
						<select	name="bs_type" class="mr20">
							<option value="1" ${model.bs_type==1?"selected='selected'":"" }>业务库</option>
							<option value="2" ${model.bs_type==2?"selected='selected'":"" }>BI库</option>
							<option value="3" ${model.bs_type==3?"selected='selected'":"" }>业务库数据变革记录库 </option>
						</select> 
					</td>
				</tr>
				<tr>
					<th>数据变更日志存放库(业务库需要选择该配置)</th>
					<td>
						<select	name="data_change_log_database_info_id" class="mr20">
							<option value="0">请选择</option>
							<c:forEach items="${requestScope.biDatabaseInfoModels }" var="item">
							<c:if test="${item.bs_type==3 }">
							<option ${model.data_change_log_database_info_id==item.id?"selected='selected'":"" } value="${item.id }">${item.description }</option>
							</c:if>
							</c:forEach>
						</select> 
					</td>
				</tr>
				<tr>
					<th>是否需要向bi库抽取数据</th>
					<td>
						<select	name="is_elt_to_bi" class="mr20">
							<option value="1" ${model.is_elt_to_bi==1?"selected='selected'":"" }>是</option>
							<option value="0" ${model.is_elt_to_bi==0?"selected='selected'":"" }>否</option>
						</select> 
					</td>
				</tr>
				<tr>
					<th>备注</th>
					<td><textarea name="description" maxlength="500" class="input length_8">${model.description }</textarea></td>
				</tr>
			</table>
		</div>

		<div class="btn_wrap">
			<div class="btn_wrap_pd">
				<button class="btn btn_submit mr10 J_ajax_submit_btn" type="submit">提交</button>
			</div>
		</div>
	</form>
	<!-- end -->
</div>
